$(document).ready(function(){
    function bindFocusing(inputElem)
    {
        inputElem.bind('focus', focusInput);
        inputElem.bind('blur', unfocusInput);
        
        function focusInput()
        {
            inputElem.addClass("focused");
        }
        
        function unfocusInput()
        {
            inputElem.removeClass("focused");
        }
    }
    
    function bindAll(array)
    {
        for (i = 0; i < array.length; i++)
        {
            bindFocusing($(array[i]));
        }
    }
    
    inputs = $('.fbtext, .private_key, .edit_field');
    bindAll(inputs);
    
});